﻿@model IEnumerable<Urna_Virtual__Galicia.Models.Padron>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Crear nuevo votante", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.dni)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.apellido)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.dni)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.apellido)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new { id=item.id }) |
            @Html.ActionLink("Detalles", "Details", new { id=item.id }) |
            @Html.ActionLink("Eliminar", "Delete", new { id=item.id })
        </td>
    </tr>
}

</table>
